package data.analysis;

import data.analysis.Analyzer.Results;

public abstract class Statistic {
	private final String name;
	
	public Statistic(String name) {
		this.name = name;
	}
	
	public String getName() {
		return name;
	}
	
	@Override
	public boolean equals(Object o) {
		if (o == null) {
			return false;
		}
		if (!this.getClass().equals(o.getClass())) {
			return false;
		}
		return this.toString().equals(o.toString());
	}
	
	@Override
	public int hashCode() {
		return toString().hashCode();
	}
	
	@Override
	public String toString() {
		return "Stat: " + name;
	}
		
	public abstract Object calculate(Results re);
}
